home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI1216.ASC
< prev
next >
Wrap
Text File
|
1993-01-06
|
15KB
|
463 lines
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 1/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
The purpose of this Technical Information Sheet is to develop an
understanding of how Paradox uses memory and to acquaint the
reader with the tools available for optimizing memory in Paradox
4.0.
Memory requirements and recommendations:
Paradox can use extended memory for all memory needs and expanded
memory as a swap area for data. Paradox 4.0 requires two
megabytes of memory to run consistently, however a minimum of
four megabytes is recommended for better performance. Paradox
can use up to a maximum of 16 megabytes. The error messages
"Insufficient Stack Space" and "DPMI Initialization Error" can
mean there is too little memory available for Paradox to load.
In these cases, sometimes merely reconfiguring how system memory
is used can bypass this problem, otherwise eliminating programs
and drivers that are competing with Paradox for memory resources
and/or adding more memory to the system are indicated. See the
section below on the Paradox Memory Environment for further
discussion of competing programs and drivers. The minimum XMS
requirement for Paradox 4.0 to load is 384 K. The amount of XMS
available can be determined with the MEM command in DOS.
Systems with more than 16 megabytes of extended RAM must limit
Paradox to 16 megabytes with the DOS setting "SET DPMIMEM=MAXMEM
16384" or the "-extk 16384" Paradox command line switch. The
DPMIMEM setting tells the Paradox DPMI Server to allow Paradox
access to only the specified amount of extended memory.
Memory differences between versions 3.5 and 4.0:
Several changes were made in the way Paradox 4.0 utilizes memory.
Paradox 3.5 runs in protected or real mode. Version 4.0 runs
only in protected mode. Paradox 4.0 is the first version of
Paradox to use the DPMI (DOS Protected Mode Interface) memory
standard. Using the DPMI standard allows Paradox 4.0 to run in
protected mode in Microsoft Windows Enhanced mode, thereby
enabling PXACCESS and SQL Link in that environment. DPMI
compliance allows Paradox 4.0 to use extended memory above 640 K
in Microsoft Windows Enhanced Mode and under OS/2, which can
greatly improve performance.
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 2/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
Paradox 4.0 internally allocates available memory differently
than previous versions. The data cache is now an object cache,
which stores forms, reports, and validity files, thus saving disk
reads when these objects are called repeatedly in a Paradox
session. Data is no longer stored in the cache.
Data caching is now provided in the larger Table Buffer area. In
Paradox 3.5 the default table buffer is around 100 K.
Paradox 4.0 allocates up to 70% of available memory to the table
buffer which can mean several megabytes allocated on systems with
four or more megabytes of extended memory.
How Paradox loads in memory:
An explanation of Paradox loading procedure might be helpful in
understanding the optimization techniques discussed later. The
diagram below and discussion on the following pages describe
where and in what order Paradox loads its various components into
memory.
┌───────────────────────┐ 16 MB Limit
│ Code Pool │
│ 200-1200 K │
├───────────────────────┤
│ "Heap" │
├───────────────────────┤
│ Protected-Mode │
│ Resident Block │
╞═══════════════════════╡ 1024 K
│ (Upper Memory) │
╞═══════════════════════╡ 640 K
│ "Real Heap" │
├───────────────────────┤
│ Real Resident Block │
├───────────────────────┤
└───────────────────────┘
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 3/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
Overview of memory areas
The Protected Mode Resident Block: This houses fixed
size program and data segments along with some DPMI
server code. What is loaded here must remain
throughout the Paradox session. It is usually 300 K to
350 K in size and is not adjustable by the user.
The Paradox Code Pool: Here, overlay code segments are
loaded. 500 K is considered to be the optimum minimum
in 4.0, depending on the amount of RAM available while
1200 K is the maximum. The Code Pool is adjustable
with the -codepool xxxx command line switch.
Real Mode Resident Blocks: Here some DPMI server code
is loaded along with some Paradox code segments needed
for real mode operation. What is loaded here must stay
in memory for the duration of the Paradox session.
The "Heap": All remaining available extended memory
and real memory combined is referred to as the Heap.
The Heap is in turn allocated to Table Buffer and
Central Memory Pool as listed below.
The Table Buffer: The Table Buffer is adjustable
directly with the -tablek xxxx command line switch.
It holds current data records and memo fields during
viewing, editing, querying and reporting on tables.
Roughly 70% of the Heap is allocated here.
The Central Memory Pool (CMP): The Central Memory Pool
is adjustable inversely with the -tablek xxxx command
line switch. It holds PAL variables, scripts, images,
and active forms and reports. Roughly 30% of the Heap
is allocated here.
Tools for optimizing memory:
Among the tools for optimizing memory in Paradox 4.0 are various
command line arguments. They are listed on the following pages
along with their functions, syntax and applications toward memory
optimization.
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 4/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
-space: This argument causes Paradox to message several
memory allocation figures on the status line upon
starting the program. These figures are useful for
gaining an understanding of how Paradox is
internally allocating memory and for monitoring
changes made to those allocations.
Paradox -space
ktot - the total amount of RAM available to Paradox
for operations after the Paradox code itself
has loaded. This figure can be used to
indicate whether or not the expected amount
of memory on the system is indeed being
recognized by and is accessible to Paradox.
kswap - the amount of RAM allocated to the table
buffer and therefore available for data
caching. This is an important figure
because it is allocated a large portion of
available memory by default. It is
adjustable with the -tablek switch below.
kgetm - the amount of memory allocated to the
Central Memory Pool (CMP). This memory is
used for caching scripts, procedures,
arrays, and variables. Kgetm is adjusted
higher by setting the -tablek switch lower.
kpool - the amount of memory allocated to the code
pool. This is the RAM that caches Paradox
code. It may be necessary to set this
parameter with the -codepool switch to be a
minimum of 500 up to a maximum of 1200.
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 5/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
-tablek: This argument sets the amount of RAM to go to the
table buffer and is reflected by kswap above. The
syntax is "-tablek xxxx", xxxx being an amount of
RAM expressed kilobytes. For example:
Paradox -tablek 2048
Sets table buffers at 2 megabytes. Setting this
parameter higher allows for a larger data cache but
at the same time limits the Central Memory Pool.
This setting should be set higher in cases where the
majority of the memory needs are data related, and
lower if the on systems that are going to be scripts
and procedure intensive.
-codepool: This argument sets the amount of RAM that is
allocated to the codepool and is reflected in kpool
above. The syntax is "-codepool xxxx", xxxx being
an amount of RAM expressed in kilobytes. The
command
Paradox -codepool 1100
sets the code pool at 1100 kilobytes. The higher
the setting, the more Paradox code will be in memory
at one time, having a beneficial effect on
performance. The minimum recommended setting is
500 K and the maximum Paradox will allocate is
1200 K.
-extk: This argument limits Paradox to a given amount of
extended RAM. The syntax is "-extk xxxx", xxxx
being an amount of RAM expressed in kilobytes. This
switch is useful in situations where it is not
desirable for Paradox to take control of all
available extended memory, under Microsoft Windows
for example. It is also used to limit Paradox from
attempting to control more than 16 megabytes of RAM,
as in:
Paradox -extk 16384
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 6/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
-emk: This argument limits Paradox to a given amount of
expanded RAM.
Paradox -emk 0
keeps Paradox from using any expanded RAM during the
session. This can be useful for avoiding conflicts
in upper memory between Paradox and other programs
or drivers.
-cachek: This argument limits the amount of RAM available to
the Paradox internal object cache. The cache will
be sized dynamically if this switch is not used.
-stack: This argument allocates the amount of memory
allocated to the internal procedure stack, which
keeps track of currently active PAL procedures in
memory. The syntax is -stack xx, xx being an amount
of RAM up to 64 kilobytes.
-norealheap: This argument tells Paradox not to incorporate any
leftover real memory into the heap after it has
loaded. (See the diagram on page 2). This is to
allow or other programs to run concurrently that
need real memory to get started. If Quattro Pro
can't load from PXACCESS it could be lacking real
memory at startup. In this case, the -norealheap
switch could be the remedy.
The Paradox Memory Environment
Disk Caches and RAM Drives: The environment in which Paradox is
running is also important to Paradox memory optimization. Disk
caching programs can be very useful for avoiding excessive disk
access. But, because these programs take a portion of memory
"off the top", they can, in modest memory situations (systems
with less than four megabytes of extended RAM), severely impede
Paradox performance or possibly prevent Paradox from loading at
all due to lack of memory. If Paradox seems slow or has problems
starting or running out of memory, check to see if a disk cache
is loading in the AUTOEXEC.BAT or CONFIG.SYS and, if so, try
PRODUCT : Paradox NUMBER : 1216
VERSION : 4.0
OS : DOS
DATE : January 6, 1993 PAGE : 7/7
TITLE : Understanding and Optimizing Memory in Paradox 4.0
limiting the RAM available to it. For the same reasons, RAM Disk
programs can also cause memory shortages for Paradox and can be
adjusted the same way if memory shortages occur.
Memory Managers: Paradox can run efficiently with other memory
managers. Some of the popular ones, QEMM, 386MAX, and EMM386 are
VCPI compliant programs and as such, have a certain effect on how
Paradox behaves. When Paradox encounters a VCPI memory manager,
it is able to gain control of the memory over which the memory
manager itself has control. However the remaining memory, the
"unallocated extended memory" is not available to Paradox. For
this reason, care should be given when allocating only a portion
of memory to one of these memory managers. It might be better
for Paradox performance to allocate all or none.
Suppose a system has eight megabytes of Extended RAM and is using
QEMM as its memory manager and is allocating two megabytes to
expanded memory with the parameter "RAM 2048". Paradox will
only be able to use those two megabytes but the remaining six
megabytes of unallocated extended memory will be lost to Paradox.
This could severely impede Paradox performance.
For additional information on memory related issues, please see
Chapter 23, 'Advanced Topics', in the Paradox 4.0 User's Guide.
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.